// 引入的分别是创建store的方法,合并reducer的方法,处理异步函数中间的方法
import { createStore , combineReducers,applyMiddleware} from "redux";
// 引入countRdeucer文件
import countRdeucer from './reducers/countRdeucer'
import movieRdeucer from './reducers/movieRdeucer'

// 引入处理异步函数中间件的包
import thunk from 'redux-thunk'
// console.log('store被调用');

// 合并reducer
const allReducer=combineReducers({
    count: countRdeucer,
    movie:movieRdeucer,
})
// 创建store
const store =createStore(allReducer,applyMiddleware(thunk))

// 暴露store
export default store